package com.bingxue.edu.framework.exception;


import com.bingxue.edu.framework.common.constant.HttpStatus;

/**
 * 系统异常
 *
 * @author panbo
 * @since 2024/6/26
 */
public class SystemException extends ErrorCodeException {

    @Override
    public int getStatusCode() {
        return HttpStatus.INTERNAL_SERVER_ERROR.getCode();
    }

    @Override
    public String getErrorMessage() {
        return "系统错误，请联系管理员!";
    }

    public SystemException(String message) {
        super(CommonErrorCode.SYSTEM_ERROR, message);
    }

    public SystemException(Throwable cause) {
        super(CommonErrorCode.SYSTEM_ERROR, cause.getMessage(), cause);
    }

    public SystemException(String message, Throwable cause) {
        super(CommonErrorCode.SYSTEM_ERROR, message, cause);
    }

    public SystemException(ErrorCode errorCode, Object... params) {
        super(errorCode, params);
    }
}
